import request from '@/utils/request'

// 获取数据库表结构
export function getTableSchema(datasourceId, tableName) {
  return request({
    url: `/fake-data/schema`,
    method: 'get',
    params: {
      datasourceId,
      tableName
    }
  })
}

// 生成假数据
export function generateFakeData(data) {
  return request({
    url: '/fake-data/generate',
    method: 'post',
    data
  })
}

// 获取假数据预览
export function previewFakeData(data) {
  return request({
    url: '/fake-data/preview',
    method: 'post',
    data
  })
}